from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtCore import Qt
import base64

# 一个简单的打包工具图标的Base64编码
ICON_BASE64 = """
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAB
2AAAAdgB+lymcgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGpSURBVFiF7dY9
aBNRHMfx7y1NqUVEcHBQkCIuDg4OuuggiFBEBEEQB3FzcnRzcnRxcnJ0EgdBBEEQBEVEpLRFi1qrxbb2
IY1tbk3uLnf5OVwSm+Z6d7m7QBz6g4F//nf/9/vcd//7PyBDhgz/O4IkJ+XzeRUKhbYx13WJ49h4bpyp
qe0MDQ1SKpXa5oMgQBQljxadFEJgWRY9PT3ouo5hGBiGgaZp9Pb2kkTkT0gp8X0f3/dxHAfbtrEsC8dx
iKJo3XVrAoQQGIZBPp+nr6+PfD6Prutomrb2ZRuRUhLHMUEQ4LourusSBAFSynXXrgkQQqBpGpqmoaoq
QohNib+hlEIpRRRFhGG47vw1AUIIdF1HVVWklP8UYFkWQRBs6B5rAoQQaJqGlPKvuxohBEKIDQHWvIRB
EBDHMUqp3wKSvGRJiaKIMAwJw5AwDP8CYLVaJQxDgiAgiiKUUv8+wHEcHMfB8zyCIEApldoWVKtVPM/D
dV2q1Sq+7xPH8YYAa7qgXq9Tq9XwfZ8oikjrESqlCMOQIAio1+vU63WCINhU+2bIkCFDWvINE5Dv5V4o
AvQAAAAASUVORK5CYII=
"""

def get_app_icon():
    """获取应用图标"""
    # 解码Base64图标数据
    icon_data = base64.b64decode(ICON_BASE64)
    
    # 创建QPixmap
    pixmap = QPixmap()
    pixmap.loadFromData(icon_data)
    
    # 创建QIcon
    return QIcon(pixmap)

def get_app_pixmap(size=32):
    """获取应用图标的Pixmap"""
    # 解码Base64图标数据
    icon_data = base64.b64decode(ICON_BASE64)
    
    # 创建QPixmap并设置大小
    pixmap = QPixmap()
    pixmap.loadFromData(icon_data)
    return pixmap.scaled(size, size, Qt.KeepAspectRatio, Qt.SmoothTransformation) 